import { createRouter,createWebHistory } from "vue-router";
import Login from '../components/Login.vue'
import Index from '../components/IndexMain.vue'
import Home from '../components/Home.vue'
import store from '../store/index.js'

const router = createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:'/',
            name:'login',
            component:Login,
        }, 
        {
            path:'/forgetpwd',
            name:'forgetpwd',
            component:()=>import('../components/Forgetpwd.vue')
        }, 
        {
            path:'/register',
            name:'register',
            component:()=>import('../components/Register.vue')
        },
        {
            path:'/Index',
            name:'index',
            component:Index,
            children:[
                {
                    path:'/Home',
                    name:'Home',
                    meta:{
                        title:'首页'
                    },
                    component:Home
                }
            ]
        }
    ]
})
export default router;
